package org.atovio.structure.graph;

/**
 * @author AtoVio, Winter Yuan
 * @version 1.0
 */
public class Triple implements Comparable<Triple> {

    /**
     * 行号，起点序号
     */
    int row;
    /**
     * 列号，终点序号
     */
    int column;
    /**
     * 元素，权值
     */
    int value;

    @Override
    public int compareTo(Triple tri) {
        if (this.row == tri.row && this.column == tri.column)
            return 0;
        return (this.row < tri.row || this.row == tri.row && this.column < tri.column ) ? -1 : 1;
    }
}
